﻿using BaiTu.CachingEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaiTu.CachingServices.CacheAttributes
{
    public class CachableAttribute : BaseAOPAttribute
    {
        private CachableAttribute()
        {
            this.ExpireType = CacheExpireType.Forever;
            this.createdOn = DateTime.Now;
        }
        public CachableAttribute(string key, string store)
            : this()
        {
            this.Key = key;
            this.Store = store;
        }
        public double Increment { get; set; }
        public string Store { get; set; }
        public string Key { get; set; }
        public CacheExpireType ExpireType { get; set; }
        private DateTime createdOn;
        public DateTime GetCreatedOn()
        {
            return createdOn;
        }
    }
}
